package com.lizhen.behaviorpattern.statepattern;

import com.lizhen.behaviorpattern.statepattern.impl.StartState;
import com.lizhen.behaviorpattern.statepattern.impl.StopState;

public class StatePattern {
    public StatePattern() {
    }

    public static void main(String[] args) {
        Context context = new Context();
        StartState startState = new StartState();
        startState.doAction(context);
        System.out.println(context.getState().toString());
        StopState stopState = new StopState();
        stopState.doAction(context);
        System.out.println(context.getState().toString());
    }
}
